# Dockerfile for Shadowsocks-go based alpine
# Copyright (C) 2018 - 2020 Teddysun <i@teddysun.com>
# Reference URL:
# https://github.com/shadowsocks/shadowsocks-go

FROM alpine:latest
LABEL maintainer="Teddysun <i@teddysun.com>"

WORKDIR /root
COPY shadowsocks-go.sh /root/shadowsocks-go.sh
COPY config_sample.json /etc/shadowsocks-go/config.json
RUN set -ex \
	&& apk add --no-cache tzdata \
	&& chmod +x /root/shadowsocks-go.sh \
	&& /root/shadowsocks-go.sh \
	&& rm -fv /root/shadowsocks-go.sh

ENV TZ=Asia/Shanghai
VOLUME /etc/shadowsocks-go

CMD [ "shadowsocks-server", "-c", "/etc/shadowsocks-go/config.json" ]
